package com.example.camerademo.camerax

import android.net.Uri
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.dylanc.viewbinding.inflate
import com.example.camerademo.R
import com.example.camerademo.databinding.ActivityCameraXactivityBinding
import com.example.camerademo.databinding.ActivityTakePicBinding

class TakePicActivity : AppCompatActivity() {
    private val binding: ActivityTakePicBinding by inflate()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_take_pic)

        val savedUri: Uri? = intent.getParcelableExtra<Uri>("savedUri")
        if (savedUri != null) {
            binding.img.setImageURI(savedUri)
        }
    }
}